Traveling itinerary problem in a scheduled multimodal transportation network for a fixed sequence of cities

Developing an efficient and economical journey plan in multimodal transportation networks is of significant and fast-growing importance, but it is still an annoying experience for a traveler. This paper aims to find the journey plan at a combined cross-border and inter-regional level when visiting a sequence of cities while utilizing several transport modes to reduce travel costs and planning time. We study a traveling itinerary problem in a scheduled multimodal transportation network with constraints on both arcs and nodes as a new extension of the shortest path problem. We formulate a 0-1 integer linear programming model for the traveling itinerary problem and develop an exact algorithm that finds a combined cross-border and inter-regional low costs journey plan. We present case studies based on real-world transport data to illustrate the usefulness and computational efficiency of the proposed approaches. We compare the results with the previously proposed approach to demonstrate the benefits of multimodal journeys. Finally, we compare the results with the solution obtained by the general-purpose 0-1 integer linear programming solver to evaluate the computational time.


Introduction
With the rapid growth in human mobility, the transportation sector faces several challenges, such as planning and scheduling transportation services to accommodate passengers.An increased number of travelers brought more attention to the transportation sector, which leads to the development of transport infrastructure and services.Several transport services are developed for every destination with different time schedules to accommodate all passengers.The decision to focus on public transport is one of the keys to substantially reducing greenhouse emissions and increasing efficiency in the transport sector.The high level of tourism and travel activities worldwide motivate and justify initiatives leading to improvements in the transport sector, especially developing novel solutions algorithm for planning trips.There are numerous journey planners available today that help travelers.Google Maps, Citymapper, Moovit, and Transit are among the most popular.None of these journey planners supports planning of multi-day trips while controlling the stay time duration.Hence, there is a need for a comprehensive journey planner that addresses the need of travelers who plan multiple-day and multiple-cities itineraries with given stay times and other time constraints in multimodal transportation.Planning a multi-city cross-border and inter-regional travel itinerary in a multimodal transport system is a complex problem that requires proper planning, taking into account factors such as transport modes availability, journey times, time of departure, arrival, and cost.Such an algorithm can improve travelers' travel experiences by reducing the time and effort needed to arrange a trip and by giving them access to more reliable and accurate information.Suppose a traveler wants to visit multiple cities in Germany, France, and Italy, and the sequence of cities they want to visit from their origin city (Munich) are Frankfurt, Paris, Marseilles, Milan, and Rome, with a three-day stay in each city.The objective is to minimize total travel costs and time while considering multimodal transport modes such as flights, buses, and trains and also considering the time constraints such as time of departure and arrival, earliest departure and the latest arrival, and stay time at each city.Having several possibilities of regular modes of transport and the number of connections to every destination with different schedules and costs, the complexity of planning a trip is increasingly high.Planning the trip individually and independently for every pair of cities in the sequence would create a confusing scenario.For example, when planning a trip from Munich to Rome while also visiting Frankfurt, Paris, Marseilles, Milan would require searching over all connections on how to get from Munich to Frankfurt.Then, when planning a trip from Frankfurt to Paris, it is needed to explore all connections where the departure time happens after all possible arrivals at Frankfurt and stay time.It is also likely that independent and individual trip planning for every pair of cities would cause the elimination of cost-effective links.For example, planning a trip from Munich to Frankfurt may lead to selecting a very cheap link.Still, it may not lead to a cheap solution when also considering the costs of getting from Frankfurt to Paris.Thus, breaking the planning problem into a sequence of pairwise searching problems creates a hard-to-handle scenario for travelers and may lead to sub-optimal results.Thus, there is a need for such algorithms that can be used by intelligent transportation systems that take all of these time constraints into account and recommend an optimized travel option for each leg of the trip in the multimodal transport network at the combined cross-border and inter-regional level.

Related work
A Multimodal Transportation System (MTS) combines two or more modes of transport that can be used to reach the final destination.When planning an itinerary, a traveler may wish to reach their destination through multiple intermediate distant cities by multimodal transport within a given time frame.Planning itineraries becomes complex in multimodal transportation because of the plethora of possibilities for transport services, time schedules, and routes.The traveling Itinerary Problem (TIP) is a variant of the traveling salesman problem [1][2][3].Many traveling salesman problem variants and generalizations have been studied extensively [4,5].Particularly relevant to this research is the shortest path problem [6][7][8][9][10] and the timedependent shortest path problem with time windows also studied in [11][12][13][14][15].
Several approaches based on graph theory have been developed in the research community.Hedi et al. [16] proposed a transfer graph defined as a set of sub-graphs connected by a transfer point, which is a node that connects two distant components of the transfer graph, Ayed et al. [17] proposed a hybrid approach of transfer and relevant graph to solve the time dependent multimodal transportation network.In [18], the authors developed a hyper graph abstraction of a time-dependent multimodal transportation network that consists of two levels of abstraction, i.e., regions and transport modes.In [19], the authors modeled the network using a hierarchical structure.Dynamic segmentation and linear reference techniques are applied, and a three-layer transport system consisting of a physical layer (street network), logical layer (roadway networks), and application layer is constructed (bus, metro, BRT, etc), time-dependent graph [20,21] and time expanded network [22].Besides several algorithms, the Dijkstra algorithm [23] is still the most frequently used approach to compute the shortest path [17,18,24,25].For arcs having interval weights, [26] proposed a generalized Dijkstra algorithm to solve the shortest path problem.Enayattabar et al. [27] provided a solution to the shortest path problem using the Dijkstra algorithm, in which the arc is represented by interval-valued Pythagorean fuzzy numbers.At the same time, other algorithms like Tabu Search [28], Ant Colony algorithm [18], Artificial bee colony (ABC) algorithm [29], Branch-and-Cut [30], A* and ALT [31,32], Fuzzy weighted Ant Colony optimization approach [33], hybrid of adaptive large neighborhood search with Tabu search [34], a hybrid of Genetic algorithm and Variable Neighborhood search (VNS) [24] and other heuristics and meta-heuristics [24,30] have also been investigated.
Ref. [2] proposed a traveling itinerary problem to find the cheapest way how to visit multiple cities within a single mode of transportation.The author decomposed the problem into macroscopic and microscopic tours.An implicit enumeration algorithm was used to find the optimal combination of tours between the origin and destination city.A dynamic form of route planning was proposed by [31] to find the optimal path from a source to a destination based on the shortest path problem algorithm over a time-dependent multimodal graph.A hybrid of the Genetic algorithm and the Variable Neighborhood Search approach was proposed by [24] for route planning in a multimodal network.The hybrid approach gives better performance in terms of the quality of the final solution in comparison with the Genetic algorithm.Ref. [35] addressed a Profitable Tour Problem based on mixed-integer programming to elaborate travel itineraries to visit tourist attractions by considering the visitor profile and solved it using the exact branch and cut algorithm and heuristic Tabu search.Sori et al. [36] proposed fuzzy inference, that, considering cost, time, and risk factors, finds the optimal solution and the desirable path between origin and destinations.Ref. [37] studied the complexity of shortest paths in time-dependent graphs in which the costs of links vary as a function of time.Ref. [1] studied the time-dependent asymmetric traveling salesman problem with time windows with a constant travel time along with the links.Ref. [32] proposed a time-dependent shortest path problem with time windows intending to minimize the total arrival time at a destination in which costs along the links are also constant.Ref. [15] studied the K− shortest path problem in a time-scheduled network with constraints on links and proposed constant traverse costs along the links for different departure times.However, the real-world transportation network is more complex.The costs to traverse a link varies with different time schedules and modes of transportation.
New Mobility Services (NMS) include Mobility as a Service (MaaS) that provides users the option of choosing multimodal mode alternative [38,39].Integration of mobility services, enables offering a combination of different modes of transport for multiple cities with stay time to visit with a single interface.MaaS is still under development, but it could change the way we conceive transport and travel.The traveling itinerary problem in multimodal transportation networks is of significant and fast-growing importance.The aim is to find the route between origin and destination while utilizing multiple transport modes [19].Different modifications of the time-dependent shortest path problems have been studied in the literature.Still, none of them addressed the problem for a given sequence of cities except [3], where the authors have studied the pre-determined travel plan in a single mode of transportation (flights).The authors decomposed the network into sub-networks based on time steps over the finite time horizon and searched for an optimal travel plan in a deterministic environment.
This paper studies the traveling itinerary problem for a fixed sequence of cities in multimodal transportation networks with time windows and other time constraints.The proposed approach is based on a directed scheduled multimodal transportation network (SMTN), constructed by integrating different modes of public transport in the sequence of cities. Next, we apply a network pruning algorithm to eliminate irrelevant transport connections.We developed an exact algorithm to find a low-cost journey plan in the SMTN under time constraints.Finally, to demonstrate the effectiveness of the proposed algorithm, we compare the results with solutions obtained by the general-purpose 0-1 integer programming solver.To the best of our knowledge, no study has previously addressed this problem in the literature.

Contribution
This paper is motivated by the traveling itinerary problem found in the domain of public transport.In particular, we address combined inter-regional and cross-border journey planning.A sequence of cities is considered with multiple days to stay in each city within a planning time horizon and other time constraints while utilizing multimodal transportation.An optimal journey plan is searched for in a deterministic environment.Nowadays, several solutions exist to solve conventional route planning in transportation systems, such as Google, Bing, and Baidu Maps.Most such routing tools support more than one transport mode.Still, they do not support journey planning for multiple intermediate cities with multiple days to stay at each city in a multimodal transportation network.Developing an efficient and economical journey plan is still an annoying experience for a traveler.Although journey planners operated by transport service providers can provide some predefined itineraries, they are not tailored to a specific traveler.These journey planners are also limited to national or regionallevel journey planning and do not support cross-border and inter-regional trips.Moreover, most journey planners only consider a single day's trip, while in real cases, most travelers wish to schedule an n− days itinerary.This deficiency can also be viewed against huge cross-border multimodal travel demand within the European Union (EU), leading to about one hundred million cross-border trips every year by EU residents and several hundred million trips by international tourists [40].In this paper, we design a more general itinerary planning service to address the above limitations.
The contributions of this paper are as follows: (i) First, we model our traveling itinerary problem as a Scheduled Multimodal Transportation Network (SMTN) through a fixed sequence of cities. Taking advantage of the particular structure of this model, we proposed an exact approach that allows us to solve problems of realistic size to optimality.(ii) We propose an approach that satisfies the unprecedented demand for intelligent and sustainable tourismdriven advances in big data.Our work can form the foundation for extensive models and support systems for decision support that will emerge as functional websites or mobile applications to plan regional or cross-border traveling itineraries in multimodal transportation.(iii) We bridge the gap between urgent travel demand and supply at the inter-regional and crossborder levels.Our solution approach shows computational effectiveness when applied to interregional and cross-border itinerary planning situations.

Scheduled multimodal transportation network
The traveling itinerary problem consists of finding the best journey plan (itinerary) for a predetermined sequence of cities based on the traveler's preferences.In our approach, we integrate multiple transport modes (i.e., bus, train, flight, etc.) into a single network to find a costeffective journey plan under time constraints.
Suppose a traveler plans to visit cities V = {1, 2, . .., n} in a fixed order given by the node indexes, where 1 is the origin, and n is the destination city.The time constraints are given by the time horizon (defined by the start time T and the end time T of the trip), the earliest time There is no stay time associated with the origin and destination nodes.Origin and destination cities may be the same.In that case, we consider them as two different cities.
To compute the cheapest multimodal path between origin and destination, we model the scheduled multimodal transportation network by a graph G = (V, A), as shown in Fig 1 .The idea behind the integration of transport connections into one network is to accommodate all the possible transport connections of different transport modes leaving and entering a city.Each city i 2 V has e i outgoing transport connections, i.e., A ¼ fð1; 2Þ 1 ; . . .; ð1; 2Þ e 1 ; . . .; ðn À 1; nÞ 1 ; . . .; ðn À 1; nÞ e nÀ 1 g.Each city i and transport connection k = 1, . .., e i are associated with a tuple [(d (i,k) , a (i,k) , c (i,k) )], where c (i,k) is the monetary costs associated with the use of k-th transport connections departing from city i, d (i,k) is its departure time, and a (i,k) is the arrival time to the next city i + 1.
Based on [2] we formulate a 0-1 integer linear programming model for the traveling itinerary problem.Let x (i,k) be a binary decision variable that takes the value one if and only if k th outgoing alternative transport service from city i is used to get to the next city i + 1 in the sequence and zero otherwise.The mathematical model takes the form (1)- (10).
The objective function (1) of the traveling itinerary problem is to find the cheapest travel plan for a trip.If a traveler is searching for the quickest route rather than the cheapest route, the objective function can be written as P nÀ 1 i¼1 P e i k¼1 t ði;kÞ x ði;kÞ by replacing the cost (c (i,k) ) with the duration of the connection (τ (i,k) ).The constraints (2-10) ensure the feasibility of the traveling itinerary.First, the departure time from the origin city must take place later than the start time of trip T, as it is assured by (2).Constraint (3) ensures that the arrival time at the destination city must be less or equal to the end time of the trip T .As there are k alternative transport services from city i to the next city in the sequence, to ensure that exactly one alternative transport service is selected, we add degree constraints (4).Once a traveler arrives at an intermediate city i, stays there for at least s i time units, as assured by constraints (5).Constraints ( 6) and (7) ensure that the total waiting time (i.e., the duration of time after the stay time till the arrival to the next city, which constitutes an unproductive time between two consequent stays) is not more than a given threshold δ.
We assume that a traveler prefers to take a transport connection from each city after a specific time of day called the earliest departure time b d and to arrive at each city before a specific time of day called the latest arrival time b a.For example, a traveler may want to depart from each city after 10:00 a.m. and arrive before 10:00 p.m. Depending on the existence of such a preference, time constraints ( 8) and ( 9) are included, where t[d (i,k) ] and t[a (i,k) ] are the time segment of departure and arrival respectively.Finally, integrality constraints (10) require that the decision variables x (i,k) are binary for all i 2 V and k = 1, . .., e i .

Solution algorithms
First, we apply the Network pruning algorithm to amend the scheduled multimodal transportation network G considering the constraints (2), (3), ( 8) and (9).Second, the journey plan is calculated by the Exact algorithm.

Network pruning algorithm
The irrelevant transport connections that do not obey some of the constraints are eliminated from the graph representing the scheduled multimodal transportation network by the Network pruning algorithm.The Network pruning algorithm is divided into two parts.

Exact algorithm
The problem (1-10) can be interpreted as a problem to find the cheapest path in the SMTN that originates at city 1 and terminates at city n and obeys all constraints (2-10).To find such a path, we propose the Exact algorithm 1.The costs are additive, and hence to find the optimal path, the dynamic programming [41] can be applied.With each arc (i, i + 1) k in the SMTN, we associate the value ϕ (i,j) , that represents the costs associated with the optimal path that is initiated at the origin city and terminates at city i + 1 and utilizes arc j exiting city i.To keep track of optimal paths, we define variables P (i,j) that contains the index of the arc exiting city i − 1, that precedes arc j exiting city i in the optimal path that is initiated at the origin city and terminates at city i + 1.
First, all values ϕ (i,k) are initialized.The computation starts from the city 1.Therefore, for the city 1, values ϕ (1,k) are set to c (1,k) for all k = 1, . .., e 1 where constraint (7) is satisfied and for all other cities and all others arcs to value 1.Furthermore, cities are recursively processed in the order of visits, and for each city i = 2, . .., n−1 and for each arc exiting the city i, the value of ϕ (i,j) and the corresponding value P (i,j) are established.Knowing the values ϕ (i−1,k) for all k = 1, . .., e i−1 , the value ϕ (i,j) is set to the minimum sum ϕ (i−1,k) + c i,j over all feasible k.The value of k which minimizes the sum is stored in P (i,j) .This way the costs of the optimal path utilizing the connection e i,j from the city 1 to the city i are calculated.After calculating the values of ϕ (n−1,k) for k = 1, . .., e n−1 , costs associated with the optimal path that is connecting cities 1 and n are determined as min k¼1;...;e nÀ 1 � ðnÀ 1;kÞ .The optimal path can be found by backtracking utilizing values recorded in P (i,j) .The optimality of the solution is implied by the Bellman's optimality mechanism of the dynamic programming [41], and it can be simply proven by induction.According to this principle, an optimal solution to a problem includes an optimal solution to any related subproblem.The proposed algorithm breaks down the problem into smaller sub-problems of finding an optimal itinerary for a shorter sub-sequences of cities.The algorithm stores the solution of sub-problems in the ϕ (i,k) .At each iteration, the algorithm examines all the possible connections between last city in the already optimized sub-problem and the next city.It is straightforward to see that values ϕ (1,k) are set in the optimal way.Assuming that values ϕ (i−1,k) are optimal, setting the values ϕ (i,j) to the minimum value of ϕ (i − 1,k) + c i,j over all feasible k is optimal, as the city i − 1 cannot be bypassed and there is no cheaper way how to reach city i + 1 while using arc j existing city i.The feasibility of the solution results from the data pruning and also from the used conditions.Application of the Network pruning algorithm 1 ensures that constraints (2), ( 3), ( 8) and ( 9) are obeyed.The constraints (4) and ( 10) are satisfied by definition as P (i, j) maintains information about one arc index only.Constraints (5) are satisfied thanks to the condition on line 16 and similarly, constraints (6) are ensured by the condition on line 17.Finally, constraints (7) are enforced by the condition on the line 3. Thus, solutions encoded by variables ϕ (i,j) and P (i,j) obey all constraints (2)- (10) and are therefore feasible.
It is possible that the exact algorithm will not find a solution.For example, if all connections between a city pair are infeasible, the algorithm will return an incomplete itinerary up to the first city in the pair.

Results and discussions
We present two data sets created based on real-world data from flight, train, and bus timetables to illustrate the feasibility and computational efficiency of the Exact algorithm.Furthermore, we present two illustrative examples and results of computational analysis.The proposed network model and algorithms were coded in Python 3.6.The optimization solver CPLEX 12.8 was used to implement and solve the model ( 1)-( 10) while limiting the computational time to 3600 seconds.The experiments were run on a 2.6 GHz Intel Core i5 Mac-Book Pro with 16 GB of RAM running OS 10.14.6.

Data
First, we collected the data for five European cities, London, Paris, Berlin, Warsaw, and Amsterdam, from publicly available sources.Flight data were obtained from the travel agency Trip [42], and train and bus data were collected from Omio journey planner website [43].Second, we assembled a data set concerning five Chinese cities, Beijing, Chongqing, Changchun, Qingdao, and Shanghai, where the data for both flights and high-speed trains were taken from [2].
The raw data, available at https://github.com/ralikk/Transportation,contains links between each pair of cities, including the transport details, origin, destination, departure time, arrival time, transfers (stopover), and cost.Currently, exchanges or stopovers are considered a part of input data.Thus, input data already include indirect connections that pass through other cities where a traveler must change the mean of transport.A generalization of the proposed approach that incorporates exchanges into the search for travel connections is left for future works.Tables 1 and 2 show the number of connections for each mode of transportation, for both data sets.The European cities data set contains connections from 2019-04-01 until 2019-04-13, while the Chinese data set contains connections from 2015-11-10 until 2015-11-20.

Illustrative example 1
Let us assume a traveler living in London (origin and destination city) with a plan to visit the sequence of cities: London !Paris !Berlin !Warsaw !Amsterdam !London.The traveler prefers to take the economy class and has a preference to stay in each intermediate city, namely, 2 days in Paris, 3 days in Berlin, 2 days in Warsaw, and 2 days in Amsterdam.The traveler has a preference for the earliest departure 08:00, and the latest arrival time 22:30 for every city.The traveler wants to plan the entire itinerary in the multimodal transportation network at once, instead of searching for each connection and travel mode separately, to achieve the minimum travel costs, under time constraints given by the time horizon, the stay time at each city, the earliest departure, and the latest arrival time.First, the SMTN was constructed, including all available transport connections.Then, by using the Network pruning algorithm, all irrelevant transport connections were eliminated.The Exact algorithm is used to find the cheapest path for the sequence of cities under time constraints.The traveling itinerary obtained by the Exact algorithm is shown in Table 3 with total costs USD 308.
Taking into account the average number of daily flights, buses, and train connections, there are 102 for London!Paris, 151 for Paris!Berlin, 88 for Berlin!Warsaw, 30 for Warsaw!Amsterdam and 85 connections for Amsterdam!London.Thus, in total, there are about 3.4 × 10 9 potential itinerary planning strategies (including the infeasible).It would take an unmanageable time if a traveler had to find the optimal itinerary manually.In comparison, the Exact algorithm took 14.10 milliseconds to construct the SMTN and to find a traveling itinerary.We developed single-mode and multimodal itineraries to demonstrate the effectiveness of traveling itineraries in the scheduled multimodal transportation network regarding travel costs and time.Fig 2 shows that the single-mode itineraries for buses and trains are not complete.This is because some pairs of cities in the sequence of travel do not have the desired transport connections, or there are no feasible connections available under time constraints.For example, in Fig 2 the train itinerary is incomplete and stops at Paris city because train connections are infeasible as traverse time exceeds the allowed waiting and traverse time (δ = 12hr).Thus, the results show that multimodal itineraries are more likely to be feasible and cost-effective than a single mode.

Illustrative example 2
As Illustrative example 2, we consider the trip developed in [2] that is considering a sequence of Chinese cities and a single mode of transport (high-speed trains) with a total cost of 6369 RMB (Chinese Yuan).The sequence of cities with the stay time to visit are Beijing (origin city), Chongqing (1 day), Wuhan (1 day), Shenzhen (2 days), Shanghai (2 days), and Changchun (destination city).The time horizon for travel starts on 2015/11/10 at 08:00 and terminates on 2015/11/20 at 08:00, with the earliest departure time at 7:00 and the latest arrival time at 23:00, for each visited city.The Exact algorithm is used to find the cheapest path for the given  sequence.The traveling itineraries developed by the approach developed in [2] and the Exact algorithm are compared in Table 4.The itinerary developed by the Exact algorithm is associated with costs of 3906.5 RMB (that is an optimal solution).The Exact algorithm took 5.10 milliseconds to construct SMTN and to find a traveling itinerary.Considering the multimodal approach proposed in this paper, for the same situation but a single-mode transport as presented in [2], the costs were reduced by 38.5%, as shown in Table 4.The results again imply that the multimodal itineraries are complete and cost-effective as compared to single modes, highlighting the superiority of the proposed approach over the approach presented in [2].

Computational analysis
Computational experiments are performed for a number of different travel sequences of cities with different time horizons and preferred earliest departure and arrival times.For each case, we used six different sequences of the same length of cities and calculated the run time (sequence details are available at https://github.com/ralikk/Transportation).We performed the experiments with both data sets (Chinese and European) with different cities in the sequence and sequence lengths to illustrate the computational efficiency of the proposed algorithms.The SMTN Graph Development refers to the run time taken by building a scheduled multimodal transportation network that also include the data management, while columns 3 and 4(b) refer to the run time taken by algorithms 1, and 2, respectively.Table 5 illustrates that the computation run time for the European cities (as we have three modes of transportation) varies from 2.13 milliseconds to 9.27 milliseconds for the Exact algorithm, while for the Chinese cities (as we have two modes of transportation only) it varies from 0.75 milliseconds to 6.17 milliseconds.The run time goes up with increasing the number of cities in the sequence and modes of transportation.The comparison of the performance of the Exact algorithm with the CPLEX is shown in Table 5.The solution obtained by the Exact algorithm is optimal, and hence we do not report the optimality gap.As expected, the CPLEX features a more extensive run-time in comparison with the Exact algorithm.The CPLEX run-time varies from 46 milliseconds to 515 milliseconds for the European cities data-set and from 658 milliseconds to 2132 milliseconds for the Chinese cities data set.The Exact algorithm run time varies from 3.20 milliseconds to 11.73 milliseconds for the European cities data-set and from 2.68 milliseconds to 8.18 milliseconds for the Chinese cities data set.Hence, the Exact algorithm provided an optimal solution with a much smaller run-time compared to the optimal solution provided by CPLEX.
The size of travel plans in computational experiments is limited to six cities.This size is greater than the majority of real-world trips.We can derive some expectations about the performance of the Exact algorithm on larger networks based on the structure of algorithms 1 and 2 and results shown in Table 5.The number of computations in the Network pruning algorithm grows linearly with the length of the sequence of cities and with the number of connections between cities.The number of computations in the Exact algorithm grows linearly with the length of the sequence of cities and quadratically with the number of connections between cities. Table 5 confirms that computational times grow mildly with the problem size.Hence, extending the number of cities should not lead to a considerable increase in the computational time, and the algorithm will remain practically applicable.

Conclusions
In response to the growing need for more complex journey planners, this study aims to develop a time scheduling system for a multimodal transportation network, which helps travelers plan their multiple-day itineraries by reaching low traveling costs when visiting a sequence of cities with given stay times and other time constraints.Considering these requirements, we formulated a traveling itinerary problem as a generalization of the shortest path problem.Our approach provides an optimal itinerary for a fixed sequence of cities.We proposed integrating multiple transport modes to achieve a complete schedule for a given sequence of cities to visit.We used the Network pruning algorithm to confine the network according to the user preferences and applied the Exact algorithm to find an optimal itinerary.The proposed approach shows effectiveness in terms of computation time to plan the itinerary under time constraints.The proposed method saves travelers time when planning a trip and provides them with a well-defined itinerary.The development of more advanced journey planners can boost tourism and help close the gap between travel demand and supply.

Limitations and future outlook
As the number of intermediate cities increases, the number of strategies for connection selection increases exponentially so that the computation time for itinerary optimization rises rapidly.Given the complexity caused by the increase in the number of intermediate cities, we may implement the proposed algorithms with a Map-Reduce computing framework and perform them on some distributed Cloud computing platforms, which could definitely report the optimal travel itineraries with significantly reduced computational time.In this study, exchange or stopover points are considered as data and can be included as a point of transfer in the multimodal transportation network.We do not take hotel expenses into consideration, which are an important portion of the travel plan costs.In our future research, we will consider the costs of staying (hotel reservation costs) at intermediate cities, develop alternative traveling itineraries for a set of cities instead of a fixed sequence, including time-scheduled intra-cities public transport, and design more sophisticated rules to identify irrelevant data.The travel distance and geographical conditions between different cities are different and optional travel modes may also be different.In this paper, the algorithm does not provide optional travel modes passengers can choose in different links.In the future, we will develop more intelligent and robust algorithms, where the passengers will have the option to choose travel mode in different links and also will have the option to choose the service type (business class, economic class, highspeed train, etc).We have only studied the deterministic approach.In the future, we will extend this work to ensure the reliability of planning inter-city travel in advance before departure.
of day of the departure b d, the latest time of day of the arrival b a (both b d and b a are the same for all cities), maximum allowed traverse time δ along each link, and stay time at each city s i .Stay time is the length of period a traveler wants to spend in a city before visiting the next city.

1 :
First, the irrelevant transport connections are removed based on the start of trip T and end of trip T .Second, transport connections are eliminated based on the earliest acceptable time of day of a departure ð b dÞ and the latest time of day of an arrival ðb aÞ.Below, we show the pseudo-code of the Network pruning algorithm.Algorithm Network pruning algorithm.Input: G, T, T , b d, b a Output: G 1 for i = 1 to n − 1 do 2 for k = 1 to e i do // Part I

Fig 2 .
Fig 2. Illustrative example 1: Comparison of costs and traverse times for single and multiple modes of transport.https://doi.org/10.1371/journal.pone.0287604.g002 Analogously to Fig 2, in Fig 3 we compare single mode (high-speed train) with multimodal (high-speed train and flights) itineraries obtained for Illustration example 2.